-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tag images with 'latest' and release tags #226
Tag images with 'latest' and release tags #226
Conversation
Signed-off-by: Pierangelo Di Pilato <[email protected]>
@@ -181,7 +181,9 @@ func Generate(cfg Config) error { | |||
Nudges: append(cfg.Nudges, cfg.NudgesFunc(c.ReleaseBuildConfiguration, ib)...), | |||
Pipeline: pipeline, | |||
AdditionalTektonCELExpression: cfg.AdditionalTektonCELExpressionFunc(c.ReleaseBuildConfiguration, ib), | |||
Tags: []string{"latest"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I probably miss something, but just to be sure here: as we use the same pipeline for on-push and on-pr, wouldn't we tag images from PRs also with latest
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, the parameter is only added for push
pipeline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{{- if eq .Event "push" }}}
- name: additional-tags
value: [{{{ range $tag := .Tags }}} {{{ $tag }}}, {{{ end }}}]
{{{- end }}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example:
spec:
params:
- name: dockerfile
value: olm-catalog/serverless-operator/index/Dockerfile
- name: git-url
value: '{{source_url}}'
- name: image-expires-after
value: 5d
- name: output-image
value: quay.io/redhat-user-workloads/ocp-serverless-tenant/serverless-operator-release-134/serverless-index:on-pr-{{revision}}
- name: revision
value: '{{revision}}'
params:
- name: dockerfile
value: olm-catalog/serverless-operator/index/Dockerfile
- name: git-url
value: '{{source_url}}'
- name: output-image
value: quay.io/redhat-user-workloads/ocp-serverless-tenant/serverless-operator-release-134/serverless-index:{{revision}}
- name: revision
value: '{{revision}}'
- name: additional-tags
value: [ latest, ]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're injecting parameters for the pipeline run and we have one pipeline run per event (push and PR separate)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah nice 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: creydr, pierDipi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
e9f6e14
into
openshift-knative:main
This will help with generating the CSV file with the "latest" image SHAs
Here is how it will be used openshift-knative/serverless-operator#2826